<style type="text/css">
<!--
.style1 {
	font-family: Verdana;
	font-size: 10px;
}
.style2 {
	font-size: 10px;
	font-weight: bold;
	font-family: Verdana;
}
-->
</style>
<form name="frm" method="post" action="getpass.php">
<div align="center"><strong><span class="style1">Enter your email address where you want to recieve your password</span>.</strong></div>
<table width="371" border="0" align="center">
  <tr>
    <td width="56"><div align="right" class="style2">Email:</div></td>
    <td width="305"><input name="email" type="text" size="50"></td>
  </tr>
  <tr>
    <td colspan="2"><div align="center">
      <input type="submit" name="go" value="Go">
    </div></td>
    </tr>
</table>
</form>
<?php
include_once('ClsSebent/config.php');
if(isset($_POST["go"]))
{
if($email!="")
{
$qry="select * from reseller where email='".$email."'";
$res=mysql_query($qry);
if($row=mysql_fetch_array($res))
{
$uid=$row["uid"];
$pwd=$row["pwd"];

$to      = $email;
$subject = 'Login Details';
$message = "Hi, Here are your login details:- \n Userid: ".$uid."\n Password: ".$pwd;
$headers = 'From: francisburnet@KingOfEnterprise.com' . "\r\n" .
   'Reply-To: '.$email . "\r\n" .
   'X-Mailer: PHP/' . phpversion();

if(mail($to, $subject, $message, $headers))
echo"<center><H4><font face='verdana' color='red'><b>Your password has been sent to your mail address.</b></font></H4></center>";
}
else
echo "<center><H4><font face='verdana' color='red'><b>Sorry, This email id does not match.</b></font></H4></center>";
}
}
?>